package com.snpic.appaw.module.third.api.sms;

import com.fhs.core.trans.anno.AutoTrans;
import com.snpic.appaw.framework.common.pojo.CommonResult;
import com.snpic.appaw.module.third.api.sms.dto.SmsReqDTO;
import com.snpic.appaw.module.third.api.sms.dto.SmsRespDTO;
import com.snpic.appaw.module.third.enums.ApiConstants;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import static  com.snpic.appaw.module.third.api.sms.SmsSenderApi.PREFIX;

@FeignClient(name = ApiConstants.NAME) // TODO 芋艿：fallbackFactory =
@Tag(name = "RPC 服务 - 第三方发短信")
@AutoTrans(namespace = PREFIX, fields = {"nickname"})
public interface SmsSenderApi {

	String PREFIX = ApiConstants.PREFIX + "/sms";

	@PostMapping(PREFIX + "/sendSms")
	@Operation(summary = "单条发送短信")
	public CommonResult<SmsRespDTO> sendSmsOne(@RequestBody @Validated SmsReqDTO reqDTO);


}
